<%@page import="com.zaofan.bean.AdminType"%>
<%@page import="com.zaofan.bean.Admin"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
	String contextPath = request.getContextPath();
	Admin admin = (Admin)session.getAttribute("admin");
 	if(admin == null){
		response.sendRedirect(contextPath + "/login.jsp?state=" + "session-invalid");
		return;
	}
	if(admin.getType() != AdminType.shopAdmin.ordinal() &&  admin.getType() != 4){
		response.sendRedirect(contextPath + "/login.jsp?state=" + "session-invalid");
		return;
	}
%>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit" />
<title><%=admin.getShopName() %>-商家后台</title>
 <script src="assets/js/jquery-1.10.2.min.js"></script>
<link href="assets/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="assets/css/font-awesome.min.css" />
<!--[if IE 7]>
	<link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
<![endif]-->
<link rel="stylesheet" href="assets/css/ace.min.css" />
<link rel="stylesheet" href="assets/css/ace-rtl.min.css" />
<link rel="stylesheet" href="assets/css/ace-skins.min.css" />
<!--[if lte IE 8]>
	<link rel="stylesheet" href="assets/css/ace-ie.min.css" />
<![endif]-->
<script src="assets/js/ace-extra.min.js"></script>

<!--[if lt IE 9]>  
      <script src="js/html5shiv.js"></script>  
      <script src="js/respond.min.js"></script>  
<![endif]-->
<script type="text/javascript">      
        var contextPath='<%=contextPath%>';
</script>
<script language="javascript">
	if (top != window)
		top.location.href = window.location.href;
</script>
</head>
<body>
	<div class="navbar navbar-default" id="navbar">
		<script type="text/javascript">
			try {
				ace.settings.check('navbar', 'fixed')
			} catch (e) {
			}
		</script>
		<div class="navbar-container" id="navbar-container">
			<div class="navbar-header pull-left">
				<a href="#" class="navbar-brand"> <small> <i
						class="icon-leaf"></i> 欢迎你
				</small>
				</a>
				<!-- /.brand -->
			</div>
			<!-- /.navbar-header -->
			<div class="navbar-header pull-right" role="navigation">

				<ul class="nav ace-nav">
					<li class="light-blue"><a data-toggle="dropdown" href="#"
						class="dropdown-toggle"> <span class="user-info"> <small>欢迎光临,</small><%=admin.getName()%>
						</span> <i class="icon-caret-down"></i>
					</a>
						<ul
							class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
							<li><a href="<%=contextPath%>/admin?action=loginOut">
									<i class="icon-off"></i> 退出
							</a></li>
							<li><a href="<%=contextPath%>/admin/modify_pass.jsp" target="content">
									<i class="icon-crog"></i> 修改密码
							</a></li>
						</ul></li>
				</ul>
				<!-- /.ace-nav -->
			</div>
			<!-- /.navbar-header -->
		</div>
		<!-- /.container -->
	</div>
	<div class="main-container" id="main-container">
		<script type="text/javascript">
			try {
				ace.settings.check('main-container', 'fixed')
			} catch (e) {
			}
		</script>
		<div class="main-container-inner">
			<a class="menu-toggler" id="menu-toggler" href="#"> <span
				class="menu-text"></span>
			</a>

			<div class="sidebar" id="sidebar">
				<script type="text/javascript">
					try {
						ace.settings.check('sidebar', 'fixed')
					} catch (e) {
					}
				</script>

				<ul class="nav nav-list" id="nav-list">
					<li class="active"><a href="shop_manage.jsp"> <i
							class="icon-home"></i> <span class="menu-text"> 控制台 </span>
					</a></li>
					<li><a href="#" class="dropdown-toggle"> <i
							class="icon-th"></i> <span class="menu-text"> 订单管理 </span> <b
							class="arrow icon-angle-down"></b>
					</a>
						<ul class="submenu">
							<li><a href="manage/todayOrderList.jsp" class="dropdown-toggle"
								target="content"> <i class="icon-double-angle-right"></i>
									今日订单
							</a></li>
							<li><a href="manage/orderList.jsp" class="dropdown-toggle"
								target="content"> <i class="icon-double-angle-right"></i>
									订单列表
							</a></li>
							<li><a href="manage/tomorrowOrderList.jsp" class="dropdown-toggle"
								target="content"> <i class="icon-double-angle-right"></i>
									明日送货订单
							</a></li>
							<li><a href="manage/yesterdayOrderList.jsp" class="dropdown-toggle"
								target="content"> <i class="icon-double-angle-right"></i>
									今日送货订单
							</a></li>
						</ul></li>
				</ul>
				<!-- /.nav-list -->
				<div class="sidebar-collapse" id="sidebar-collapse">
					<i class="icon-double-angle-left"
						data-icon1="icon-double-angle-left"
						data-icon2="icon-double-angle-right"></i>
				</div>

				<script type="text/javascript">
					try {
						ace.settings.check('sidebar', 'collapsed')
					} catch (e) {
					}
				</script>
			</div>

			<div class="main-content row" style="background-color: #fff;">

				<iframe src="main.jsp" frameborder="0"
					style="height: 100%; width: 100%;" name="content"></iframe>
			</div>
			<!-- /.main-content -->
		</div>
		<!-- /.main-container-inner -->

		<a href="#" id="btn-scroll-up"
			class="btn-scroll-up btn btn-sm btn-inverse"> <i
			class="icon-double-angle-up icon-only bigger-110"></i>
		</a>
	</div>
	<!-- /.main-container -->
	
	<script src="assets/js/bootstrap.min.js"></script>
	<script src="assets/js/typeahead-bs2.min.js"></script>
	<!--[if lte IE 8]>
	<script src="assets/js/excanvas.min.js"></script>
<![endif]-->
	<script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script>
	<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
	<script src="assets/js/jquery.slimscroll.min.js"></script>
	<script src="assets/js/jquery.easy-pie-chart.min.js"></script>
	<script src="assets/js/jquery.sparkline.min.js"></script>
	<script src="assets/js/flot/jquery.flot.min.js"></script>
	<script src="assets/js/flot/jquery.flot.pie.min.js"></script>
	<script src="assets/js/flot/jquery.flot.resize.min.js"></script>
	<script src="js/common.js"></script>
	<script src="assets/js/ace-elements.min.js"></script>
	<script src="assets/js/ace.min.js"></script>
	<script type="text/javascript">
		var height = $(window).height();
		$('.main-content').height(height - 50);

		$(window).resize(function() {
			var h = $(window).height();
			if (h > height) {
				$('.main-content').height(h - 50);
			}
		});
	</script>
</body>
</html>